package tech.edwardvan.java.generic;

/**
 * 泛型方法
 *
 * @author EdwardVan
 */
public class GenericFunctionDemo {

    public static void main(String[] args) {
        Integer i = 1;
        Integer returnInteger = GenericFunction.function(i);
        String returnString = GenericFunction.function("test");
    }

    /**
     * 泛型方法
     */
    public static class GenericFunction {
        public static <T> T function(T t) {
            return t;
        }
    }
}
